//定义一个员工类，存放用户的工号、姓名和部门信息；
//  定义两个构造函数，一个是无参；
//   一个有参构造函数，对类的属性进行初始化。
public class Staff {
    private int jobnumber;
    private String name;
    private String department;

    public Staff() {

    }

    public Staff(int jobnumber, String name, String department) {
        this.jobnumber = jobnumber;
        this.name = name;
        this.department = department;
    }

    public String getStaff() {
        String str = "工号:" + jobnumber + ";姓名:" + name + ";部门:" + department;
        return str;
    }
}

class TestStaff {
    public static void main(String[] args) {
        Staff s = new Staff(123456, "张三", "人事部");
        System.out.println(s.getStaff());

    }
}